package ys.db2es.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
@TableName("t_product")
public class Product implements Serializable, IdAble {
    @JsonIgnore
    private Integer id;

    private String name;

    @Override
    public String getIdStr() {
        return String.valueOf(id);
    }

    @Override
    public void setIdStr(String idStr) {
        this.id = Integer.valueOf(idStr);
    }
}
